﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using ZhouYu.DreamTour.WinService;

namespace Zhouyu.DreamTour.WinService
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main()
        {
            try
            {
                //windows服务初始化工作
                AutofacUtil.InitAutofac();
            }
            catch (Exception ex)
            {
                File.AppendAllText("D:\\Log.txt",ex.ToString());
                throw;
            }

            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new Service1()
            };
            ServiceBase.Run(ServicesToRun);
        }
    }
}
